package com.chentf.controller;

import com.chentf.feignclients.HystrixClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chentengfei
 * @desc ...
 * @date 2021-09-20 19:29:17
 */
@RestController
public class TestDemoController {

    @Autowired
    private HystrixClient hystrixClient;

    @GetMapping("/test")
    public String test(){
        System.out.println("test ok!!!");
        String demo = hystrixClient.demo(-1);
        System.out.println("demo result:"+demo);
        return "test ok!!!";
    }
}
